<?php
class Notice extends AppModel
{
    var $name = 'Notice';
    var $primaryKey = 'id'; 
    var $order = array("Notice.date" => "desc");

  /*  var $belongsTo = array(
        'User_msg_relationship' => array(
            'conditions' => array("User_msg_relationship.id_two=Msg.id and User_msg_relationship.id_one='' and User_msg_relationship.relationship='message'"),
           // 'fields' => "Msg.subject,Msg.content",
            'className'    => 'User_msg_relationship',
            'foreignKey'    => ''
        ));*/
        
 	function saveClick($noticeid){
 	    if ($noticeid){
    		$this->data = $this->read('click',$noticeid);
    		$click = (int)$this->data['Notice']['click']+1;
    		$this->id = $noticeid;
    		$this->saveField('click',$click);
    	}
 	}
}
?>